package day4;

/**
 * @author oldliu
 * @since 1.0
 */
public class Leijia10000 {
    public static void main(String[] args) {
        int sum = 0;
        int start = 1;
//        while (sum <= 10000) {
//            sum += start++;
//        }
        while (true) {
            sum += start;
            if (sum >= 10000) {
                break;
            }
            start++;
        }
        System.out.println("累加到" + start + "超过了1万");
    }
}
